// ------------------------------  获取

/**
  * @api {get} /api/type 1-获取品类
  * @apiVersion 0.0.1
  * @apiGroup type
  * @apiSampleRequest /api/type
  * * @apiHeader {String} token
  * @apiContentType application/json
  * @apiSuccess {Number} code
  * @apiSuccess {Object[]} data
  * @apiSuccess {String} message
  * @apiSuccessExample Success-Response:
  * HTTP/1.1 200 OK
  {
    "code": 0,
    "data": [],
    "message": "请求成功"
  }
  */

// ------------------------------ 新增/修改
/**
* @api {post} /api/type/:id 2-新增/修改品类
* @apiVersion 0.0.1
* @apiGroup type
* @apiSampleRequest /api/type/0
* @apiHeader {String} token
* @apiParamExample {json} 参数:
  {
    "name": "水果"
  }
* @apiContentType application/json
* @apiSuccess {Number} code
* @apiSuccess {Object[]} data
* @apiSuccess {String} message
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
{
  "code": 0,
  "data": null,
  "message": "请求成功"
}
*/

// ------------------------------ 删除
/**
* @api {post} /api/type/del/:id 3-删除品类
* @apiVersion 0.0.1
* @apiGroup type
* @apiSampleRequest /api/type/del/1
* @apiHeader {String} token
* @apiContentType application/json
* @apiSuccess {Number} code
* @apiSuccess {Object[]} data
* @apiSuccess {String} message
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
{
  "code": 0,
  "data": null,
  "message": "请求成功"
}
*/